<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="ui" uri="http://com.am.tag2" %>
<%@ include file="../common.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'userList.jsp' starting page</title>
     <style type="text/css">
    	.linkActive{color:#ff9900;text-decoration:none;font-weight:bold;}
		.linkNoActive{color:#3399ff;}
    </style>
    <script type="text/javascript" src="${path}/js/public/grid.js"></script>
  	<script type="text/javascript">
  		function doQuery()
  		{
  			if($("#startDate").val().localeCompare($("#endDate").val()) > 0)
			{
				alert("起始日期不能大于结束日期");
				return false;
			}
  			resetGrid(mygrid,"queryForm");
  		}
  		
  		function doReset()
  		{
  			$("#person_name").val("");
  			$("#user_name").val("");
  			$("#person_campus").val("");
  			$("#description").val("");
  			$("#startDate").val("");
  			$("#endDate").val("");
  		}
  		
  		function campusRender(value)
  		{
  			if(value == "0")
			{
				return "校本部";	
			}else if(value == "1")
			{
				return "白云校区";	
			}else if(value == "2")
			{
				return "北校区";	
			}else{
				return "西校区";	
			}
  		}
  		
  	</script>
  </head>
  <body>
  	<table id="" cellSpacing="0" cellPadding="0" style="width:100%;height:100%;" border="0">
  		<tr>
			<td class="windowTitle">人员管理  &gt; 病情分析</td>
		</tr>
  		<tr id="">
			<td style="height:35px;width:100%" class="windowHead">	
				<form id="queryForm">
					<table cellSpacing="0" cellPadding="0" width="100%" height="100%" border="0" >
						<tr>
							<td>
								<table cellpadding="0" cellspacing="0" style="border: 0">
									<tr height="25px">
										<td width="60px" align="right">病人姓名：</td>
										<td width="145px" align="left"><input name="search_CONTAIN_person_name" id="person_name" type="text" class="textbox" style="width:145px;" /></td>
										<td width="80px" align="right">诊断医生：</td>
										<td width="145px" align="left">
											<input name="search_CONTAIN_user_name" id="user_name" type="text" class="textbox" style="width:145px;" />
										</td>
										<td width="80px" align="right">所在校区：</td>
										<td width="145px" align="left">
											<select name="search_EQ_person_campus" id="person_campus" style="width:145px;margin-left: 3px">
												<option value="">--请选择--</option>
												<option value="0">校本部</option>
												<option value="1">白云校区</option>
												<option value="2">北校区</option>
												<option value="3">西校区</option>
											</select>
										</td>
										<td width="60px" align="right"><ui:Button type="query" onclick="doQuery()">查询</ui:Button></td>
									</tr>
									<tr height="25px">
										<td width="60px" align="right">诊断描述：</td>
										<td width="145px" align="left"><input name="search_CONTAIN_description" id="description" type="text" class="textbox" style="width:145px;" /></td>
										<td width="80px" align="right">创建时间：</td>
										<td width="145px" align="left">
											<ui:DateTimePicker id="startDate" name="search_GTE_create_time" style="width: 145px" ></ui:DateTimePicker>
										</td>
										<td width="80px" align="center">&gt;&gt;</td>
										<td width="145px" align="left">
											<ui:DateTimePicker id="endDate" name="search_LTE_create_time" style="width: 145px"></ui:DateTimePicker>
										</td>
										<td width="60px" align="right">
											<ui:Button onclick="doReset()"><img src="${path}/images/menu/reset.png" />重置</ui:Button>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</form>
				<br/>
				<a style="text-decoration: none;"></a>
			</td>
		</tr>
		<tr id="">
			<td style="width:100%;height:100%;overflow:hidden"  class="windowBody">
				<div id="mess_box" style="width:100%;height:100%;overflow:hidden">
					<ui:Grid id="mygrid" css="width:100%;height:100%"
				    		 onCellClicked="selectedSingleRow2"
				    		 rowPrePage="15" 
				    		 dataProvider="com.system.provider.PatientRecordListProvider:getData" >
				    	<ui:GridField name="person_name" header="病人姓名" align="center" width="15%"/>
				    	<ui:GridField name="user_name" header="诊断医生" align="center" width="15%"/>
				    	<ui:GridField name="person_campus" header="所在校区" align="center" width="15%" render="campusRender"/>
				    	<ui:GridField name="description" header="诊断描述" align="center" width="36%"/>
				    	<ui:GridField name="create_time" header="创建时间" align="center" width="19%"/>
			    	</ui:Grid>
		    	</div>
		    </td>
		</tr>
  	</table>
  	<script type="text/javascript">
		$().ready(function(){
			disableSelectAll(mygrid);
		});
	</script>
  </body>
</html>
